package cj.web.uc.dao;

import java.util.List;
import java.util.Map;

import net.paoding.rose.jade.annotation.DAO;
import net.paoding.rose.jade.annotation.SQL;

/**
 * 
 * @author 
 *
 */
@DAO
public interface PayHistoryDAO{
	
	@SQL("SELECT a.*,b.name as memberName,b.phone as memberPhone,c.orderNo as orderNo FROM PayHistory a "
			+ "left join member b on a.memberId=b.id "
			+ "left join videoorder c on a.orderId=b.id "
			+ "WHERE memberId=:1 ORDER BY createAt DESC LIMIT :2,:3 ")
    List<Map> query(int memberId,int start,int length);
	
	@SQL("SELECT count(1) FROM PayHistory WHERE memberId=:1 ")
    int querySize(int memberId);
}